<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

use EventDispatcher\Events\DemoEvent;
use EventDispatchers\Subscribers\DemoSubscriber;
use Symfony\Component\EventDispatcher\EventDispatcher;

require_once './vendor/autoload.php';

$dispatcher = new EventDispatcher();

$subscriber = new DemoSubscriber();

$dispatcher->addSubscriber($subscriber);

$dispatcher->dispatch(DemoEvent::NAME, new DemoEvent());
